#define _CRT_SECURE_NO_WARNINGS 1
int findRepeatNumber(int* nums, int numsSize) {
    int min = nums[0];
    int max = nums[0];
    int i = 0;
    for (i = 0; i < numsSize; i++)
    {
        if (nums[i] > max)
        {
            max = nums[i];
        }
        if (nums[i] < min)
        {
            min = nums[i];
        }
    }
    int range = max - min + 1;
    int* hash = (int*)calloc(range, sizeof(int));
    for (i = 0; i < numsSize; i++)
    {
        hash[nums[i] - min]++;
    }
    for (i = 0; i < range; i++)
    {
        if (hash[i] > 1)
        {
            return i + min;
        }
    }
    return i + min;
}